home *** CD-ROM | disk | FTP | other *** search
/ Apple Reference & Presen… 1994 February Supplement / ARPL-Feb-94-Supplement-PowerPC.iso / 3rd Party PowerPC Demo Apps / Aldus FreeHand / Aldus FreeHand 4.0 TV / Aldus FreeHand 4.0 TV.rsrc / Post_1101 < prev    next >
Encoding:
Text File  |  1994-01-25  |  11.1 KB  |  592 lines

  1. /onlyk4{false}ndf
  2. /ccmyk{dup 5 -1 roll sub 0 max exch}ndf
  3. /cmyk2gray{
  4.  4 -1 roll 0.3 mul 4 -1 roll 0.59 mul 4 -1 roll 0.11 mul
  5.  add add add 1 min neg 1 add
  6. }bdf
  7. /setcmykcolor{1 exch sub ccmyk ccmyk ccmyk pop setrgbcolor}ndf
  8. /maxcolor { 
  9.  max max max  
  10. } ndf
  11. /maxspot {
  12.  pop
  13. } ndf
  14. /setcmykcoloroverprint{4{dup -1 eq{pop 0}if 4 1 roll}repeat setcmykcolor}ndf
  15. /findcmykcustomcolor{5 packedarray}ndf
  16. /setcustomcolor{exch aload pop pop 4{4 index mul 4 1 roll}repeat setcmykcolor pop}ndf
  17. /setseparationgray{setgray}ndf
  18. /setoverprint{pop}ndf 
  19. /currentoverprint false ndf
  20. /cmykbufs2gray{
  21.  0 1 2 index length 1 sub
  22.  { 
  23. 4 index 1 index get 0.3 mul 
  24. 4 index 2 index get 0.59 mul 
  25. 4 index 3 index get 0.11 mul 
  26. 4 index 4 index get 
  27. add add add cvi 255 min
  28. 255 exch sub
  29. 2 index 3 1 roll put
  30.  }for
  31.  4 1 roll pop pop pop
  32. }bdf
  33. /colorimage{
  34.  pop pop
  35.  [
  36. 5 -1 roll/exec cvx 
  37. 6 -1 roll/exec cvx 
  38. 7 -1 roll/exec cvx 
  39. 8 -1 roll/exec cvx
  40. /cmykbufs2gray cvx
  41.  ]cvx 
  42.  image
  43. }
  44. %. version 47.1 on Linotronic of Postscript defines colorimage incorrectly (rgb model only)
  45. version cvr 47.1 le 
  46. statusdict /product get (Lino) anchorsearch{pop pop true}{pop false}ifelse
  47. and{userdict begin bdf end}{ndf}ifelse
  48. fhnumcolors 1 ne {/yt save def} if
  49. /customcolorimage{
  50.  aload pop
  51.  (_vc_Registration) eq 
  52.  {
  53. pop pop pop pop separationimage
  54.  }
  55.  {
  56. /ik xdf /iy xdf /im xdf /ic xdf
  57. ic im iy ik cmyk2gray /xt xdf
  58. currenttransfer
  59. {dup 1.0 exch sub xt mul add}concatprocs
  60. st 
  61. image
  62.  }
  63.  ifelse
  64. }ndf
  65. fhnumcolors 1 ne {yt restore} if
  66. fhnumcolors 3 ne {/yt save def} if
  67. /customcolorimage{
  68.  aload pop 
  69.  (_vc_Registration) eq 
  70.  {
  71. pop pop pop pop separationimage
  72.  }
  73.  {
  74. /ik xdf /iy xdf /im xdf /ic xdf
  75. 1.0 dup ic ik add min sub 
  76. 1.0 dup im ik add min sub 
  77. 1.0 dup iy ik add min sub 
  78. /ic xdf /iy xdf /im xdf
  79. currentcolortransfer
  80. 4 1 roll 
  81. {dup 1.0 exch sub ic mul add}concatprocs 4 1 roll 
  82. {dup 1.0 exch sub iy mul add}concatprocs 4 1 roll 
  83. {dup 1.0 exch sub im mul add}concatprocs 4 1 roll 
  84. setcolortransfer
  85. {/dummy xdf dummy}concatprocs{dummy}{dummy}true 3 colorimage
  86.  }
  87.  ifelse
  88. }ndf
  89. fhnumcolors 3 ne {yt restore} if
  90. fhnumcolors 4 ne {/yt save def} if
  91. /customcolorimage{
  92.  aload pop
  93.  (_vc_Registration) eq 
  94.  {
  95. pop pop pop pop separationimage
  96.  }
  97.  {
  98. /ik xdf /iy xdf /im xdf /ic xdf
  99. currentcolortransfer
  100. {1.0 exch sub ik mul ik sub 1 add}concatprocs 4 1 roll
  101. {1.0 exch sub iy mul iy sub 1 add}concatprocs 4 1 roll
  102. {1.0 exch sub im mul im sub 1 add}concatprocs 4 1 roll
  103. {1.0 exch sub ic mul ic sub 1 add}concatprocs 4 1 roll
  104. setcolortransfer
  105. {/dummy xdf dummy}concatprocs{dummy}{dummy}{dummy}
  106. true 4 colorimage
  107.  }
  108.  ifelse
  109. }ndf
  110. fhnumcolors 4 ne {yt restore} if
  111. /separationimage{image}ndf
  112. /newcmykcustomcolor{6 packedarray}ndf
  113. /inkoverprint false ndf
  114. /setinkoverprint{pop}ndf 
  115. /setspotcolor { 
  116.  spots exch get
  117.  dup 4 get (_vc_Registration) eq
  118.  {pop 1 exch sub setseparationgray}
  119.  {0 5 getinterval exch setcustomcolor}
  120.  ifelse
  121. }ndf
  122. /currentcolortransfer{currenttransfer dup dup dup}ndf
  123. /setcolortransfer{st pop pop pop}ndf
  124. /fas{}ndf
  125. /sas{}ndf
  126. /fhsetspreadsize{pop}ndf
  127. /filler{fill}bdf 
  128. /F{gsave {filler}fp grestore}bdf
  129. /f{closepath F}bdf
  130. /S{gsave {stroke}fp grestore}bdf
  131. /s{closepath S}bdf
  132. /bc4 [0 0 0 0] def 
  133. /_lfp4 {
  134.  /yt xdf       
  135.  /xt xdf       
  136.  /ang xdf      
  137.  storerect
  138.  /taperfcn xdf
  139.  /k2 xdf /y2 xdf /m2 xdf /c2 xdf
  140.  /k1 xdf /y1 xdf /m1 xdf /c1 xdf
  141.  c1 c2 sub abs
  142.  m1 m2 sub abs
  143.  y1 y2 sub abs
  144.  k1 k2 sub abs
  145.  maxcolor      
  146.  calcgraysteps mul abs round  
  147.  height abs adjnumsteps   
  148.  dup 2 lt {pop 2} if    
  149.  1 sub /numsteps1 xdf
  150.  currentflat mark    
  151.  currentflat clipflatness  
  152.  /delta top bottom sub numsteps1 1 add div def 
  153.  /right right left sub def  
  154.  /botsv top delta sub def  
  155.  {
  156. {
  157. W
  158. xt yt translate 
  159. ang rotate
  160. xt neg yt neg translate 
  161. dup setflat 
  162. /bottom botsv def
  163. 0 1 numsteps1 
  164. {
  165. numsteps1 div taperfcn /frac xdf
  166. bc4 0 c2 c1 sub frac mul c1 add put
  167. bc4 1 m2 m1 sub frac mul m1 add put
  168. bc4 2 y2 y1 sub frac mul y1 add put
  169. bc4 3 k2 k1 sub frac mul k1 add put
  170. bc4 vc
  171. 1 index setflat 
  172. mark {newpath left bottom right delta rectfill}stopped
  173. {cleartomark exch 1.3 mul dup setflat exch 2 copy gt{stop}if}
  174. {cleartomark exit}ifelse
  175. }loop
  176. /bottom bottom delta sub def
  177. }for
  178. }
  179. gsave stopped grestore
  180. {exch pop 2 index exch 1.3 mul dup 100 gt{cleartomark setflat stop}if}
  181. {exit}ifelse
  182.  }loop
  183.  cleartomark setflat
  184. }bdf
  185. /bcs [0 0] def 
  186. /_lfs4 {
  187.  /yt xdf       
  188.  /xt xdf       
  189.  /ang xdf      
  190.  storerect
  191.  /taperfcn xdf
  192.  /tint2 xdf      
  193.  /tint1 xdf      
  194.  bcs exch 1 exch put    
  195.  tint1 tint2 sub abs    
  196.  bcs 1 get maxspot    
  197.  calcgraysteps mul abs round  
  198.  height abs adjnumsteps   
  199.  dup 2 lt {pop 2} if    
  200.  1 sub /numsteps1 xdf
  201.  currentflat mark    
  202.  currentflat clipflatness  
  203.  /delta top bottom sub numsteps1 1 add div def 
  204.  /right right left sub def  
  205.  /botsv top delta sub def  
  206.  {
  207. {
  208. W
  209. xt yt translate 
  210. ang rotate
  211. xt neg yt neg translate 
  212. dup setflat 
  213. /bottom botsv def
  214. 0 1 numsteps1 
  215. {
  216. numsteps1 div taperfcn /frac xdf
  217. bcs 0
  218. 1.0 tint2 tint1 sub frac mul tint1 add sub
  219. put bcs vc
  220. 1 index setflat 
  221. mark {newpath left bottom right delta rectfill}stopped
  222. {cleartomark exch 1.3 mul dup setflat exch 2 copy gt{stop}if}
  223. {cleartomark exit}ifelse
  224. }loop
  225. /bottom bottom delta sub def
  226. }for
  227. }
  228. gsave stopped grestore
  229. {exch pop 2 index exch 1.3 mul dup 100 gt{cleartomark setflat stop}if}
  230. {exit}ifelse
  231.  }loop
  232.  cleartomark setflat
  233. }bdf
  234. /_rfs4 {
  235.  /tint2 xdf      
  236.  /tint1 xdf      
  237.  bcs exch 1 exch put    
  238.  /radius xdf      
  239.  /yt xdf       
  240.  /xt xdf       
  241.  tint1 tint2 sub abs    
  242.  bcs 1 get maxspot    
  243.  calcgraysteps mul abs round  
  244.  radius abs adjnumsteps   
  245.  dup 2 lt {pop 2} if    
  246.  1 sub /numsteps1 xdf
  247.  radius numsteps1 div 2 div /halfstep xdf 
  248.  currentflat mark    
  249.  currentflat clipflatness  
  250.  {
  251. {
  252. dup setflat 
  253. 0 1 numsteps1 
  254. {
  255. dup /radindex xdf
  256. numsteps1 div /frac xdf
  257. bcs 0
  258. tint2 tint1 sub frac mul tint1 add
  259. put bcs vc
  260. 1 index setflat 
  261. newpath mark xt yt radius 1 frac sub mul halfstep add 0 360
  262. { arc
  263. radindex numsteps1 ne 
  264. {
  265. xt yt 
  266. radindex 1 add numsteps1 
  267. div 1 exch sub 
  268. radius mul halfstep add
  269. dup xt add yt moveto 
  270. 360 0 arcn 
  271. } if
  272. fill
  273. }stopped
  274. {cleartomark exch 1.3 mul dup setflat exch 2 copy gt{stop}if}
  275. {cleartomark exit}ifelse
  276. }loop
  277. }for
  278. }
  279. gsave stopped grestore
  280. {exch pop 2 index exch 1.3 mul dup 100 gt{cleartomark setflat stop}if}
  281. {exit}ifelse
  282.  }loop
  283.  cleartomark setflat
  284. }bdf
  285. /_rfp4 {
  286.  /k2 xdf /y2 xdf /m2 xdf /c2 xdf
  287.  /k1 xdf /y1 xdf /m1 xdf /c1 xdf
  288.  /radius xdf      
  289.  /yt xdf       
  290.  /xt xdf       
  291.  c1 c2 sub abs
  292.  m1 m2 sub abs
  293.  y1 y2 sub abs
  294.  k1 k2 sub abs
  295.  maxcolor      
  296.  calcgraysteps mul abs round  
  297.  radius abs adjnumsteps   
  298.  dup 2 lt {pop 2} if    
  299.  1 sub /numsteps1 xdf
  300.  radius numsteps1 div 2 div /halfstep xdf 
  301.  currentflat mark    
  302.  currentflat clipflatness  
  303.  {
  304. {
  305. dup setflat 
  306. 0 1 numsteps1 
  307. {
  308. dup /radindex xdf
  309. numsteps1 div /frac xdf
  310. bc4 0 c2 c1 sub frac mul c1 add put
  311. bc4 1 m2 m1 sub frac mul m1 add put
  312. bc4 2 y2 y1 sub frac mul y1 add put
  313. bc4 3 k2 k1 sub frac mul k1 add put
  314. bc4 vc
  315. 1 index setflat 
  316. newpath mark xt yt radius 1 frac sub mul halfstep add 0 360
  317. { arc
  318. radindex numsteps1 ne 
  319. {
  320. xt yt 
  321. radindex 1 add numsteps1 
  322. div 1 exch sub 
  323. radius mul halfstep add
  324. dup xt add yt moveto 
  325. 360 0 arcn 
  326. } if
  327. fill
  328. }stopped
  329. {cleartomark exch 1.3 mul dup setflat exch 2 copy gt{stop}if}
  330. {cleartomark exit}ifelse
  331. }loop
  332. }for
  333. }
  334. gsave stopped grestore
  335. {exch pop 2 index exch 1.3 mul dup 100 gt{cleartomark setflat stop}if}
  336. {exit}ifelse
  337.  }loop
  338.  cleartomark setflat
  339. }bdf
  340. /lfp4{_lfp4}ndf
  341. /lfs4{_lfs4}ndf
  342. /rfs4{_rfs4}ndf
  343. /rfp4{_rfp4}ndf
  344. /ScitexVignette defed /xt xdf
  345. xt not {/yt save def} if
  346.  /anyeq {
  347. cvlit exch
  348. cvlit exch
  349. 1 index type /arraytype eq 
  350. 2 index type /packedarraytype eq 
  351. or
  352. 1 index type /arraytype eq
  353. 2 index type /packedarraytype eq
  354. or
  355. and {
  356. 1 index length
  357. 1 index length eq {
  358. dup length 1 sub -1 0 {
  359. /ind exch def
  360. 1 index ind get
  361. 1 index ind get
  362. anyeq not {/ind -1 def exit} if
  363. } for
  364. pop pop
  365. ind 0
  366. eq
  367. }{
  368. pop pop false
  369. } ifelse
  370. }{
  371. eq 
  372. } ifelse
  373.  } def
  374.  
  375.  /lfp4 where {
  376. pop
  377. /oldlfp /lfp4 load def 
  378. /lfp4 {
  379. /yt xdf 
  380. /xt xdf 
  381. /ang xdf 
  382. storerect 
  383. /taperfcn xdf 
  384. /kc2 xdf 
  385. /yc2 xdf 
  386. /mc2 xdf 
  387. /cc2 xdf 
  388. /kc1 xdf 
  389. /yc1 xdf 
  390. /mc1 xdf 
  391. /cc1 xdf 
  392. save
  393. 20 dict dup begin
  394. /VGVersion 0 def
  395. /typeOfVign 1 def
  396. /xDimension right left sub abs def 
  397. /yDimension top bottom sub abs def 
  398. /numOfColorPoints 2 def
  399. /verticalCoord [ top bottom ] def 
  400. /horizontalCoord [ left left ] def 
  401. /colorArray [
  402. cc1 mc1 yc1 kc1
  403. cc2 mc2 yc2 kc2
  404. ] def
  405. /stepVectorFunction /taperfcn load {logtaper} anyeq {[1]}{[0]}ifelse def
  406. /smoothVG [0] def
  407. end
  408.  
  409. W
  410.  
  411. xt yt translate ang rotate xt neg yt neg translate
  412.  
  413. ScitexVignette 
  414.  
  415. exch 
  416.  
  417. restore
  418.  
  419. not {
  420. /BeginGradation where {pop BeginGradation} if
  421. cc1 mc1 yc1 kc1 cc2 mc2 yc2 kc2 
  422. /taperfcn load left bottom right top ang xt yt oldlfp
  423. /EndGradation where {pop EndGradation} if
  424. } if
  425. }bdf
  426.  } if 
  427.  
  428.  /lfs4 where {
  429. pop
  430. /oldlfs /lfs4 load def 
  431. /lfs4 {
  432. /yt xdf 
  433. /xt xdf 
  434. /ang xdf 
  435. storerect 
  436. /taperfcn xdf 
  437. /tint2 xdf 
  438. /tint1 xdf 
  439. /spotNum xdf 
  440. save
  441. 20 dict dup begin
  442. /VGVersion 0 def
  443. /typeOfVign 1 def
  444. /xDimension right left sub abs def 
  445. /yDimension top bottom sub abs def 
  446. /numOfColorPoints 2 def
  447. /verticalCoord [ top bottom ] def 
  448. /horizontalCoord [ left left ] def 
  449. /colorArray [
  450. tint2 spots spotNum
  451. get aload pop pop pop 4{4 index mul 4 1 roll}repeat
  452. 5 -1 roll pop
  453. tint1 spots spotNum
  454. get aload pop pop pop 4{4 index mul 4 1 roll}repeat
  455. 5 -1 roll pop
  456. ] def
  457. /stepVectorFunction /taperfcn load {logtaper} anyeq {[1]}{[0]}ifelse def
  458. /smoothVG [0] def
  459. end
  460.  
  461. W
  462.  
  463. xt yt translate ang rotate xt neg yt neg translate
  464.  
  465. ScitexVignette 
  466.  
  467. exch 
  468.  
  469. restore
  470.  
  471. not {
  472. /BeginGradation where {pop BeginGradation} if
  473. spotNum tint1 tint2
  474. /taperfcn load left bottom right top ang xt yt oldlfs
  475. /EndGradation where {pop EndGradation} if
  476. } if
  477. }bdf
  478.  } if 
  479.  
  480.  /rfp4 where {
  481. pop
  482. /oldrfp /rfp4 load def 
  483. /rfp4 {
  484. /kc2 xdf 
  485. /yc2 xdf 
  486. /mc2 xdf 
  487. /cc2 xdf 
  488. /kc1 xdf 
  489. /yc1 xdf 
  490. /mc1 xdf 
  491. /cc1 xdf 
  492. /radius xdf 
  493. /yt xdf 
  494. /xt xdf 
  495.  
  496. save
  497. 20 dict dup begin
  498. /VGVersion 0 def
  499. /typeOfVign 3 def 
  500. /xDimension radius 2 mul def 
  501. /yDimension radius 2 mul def 
  502. /numOfColorPoints 2 def
  503. /verticalCoord [ yt yt ] def
  504. /horizontalCoord [ xt dup radius add ] def
  505. /colorArray [
  506. cc2 mc2 yc2 kc2
  507. cc1 mc1 yc1 kc1
  508. ] def
  509. /stepVectorFunction [0] def
  510. /smoothVG [0] def
  511. end
  512.  
  513. W
  514.  
  515. ScitexVignette 
  516.  
  517. exch 
  518.  
  519. restore
  520.  
  521. not {
  522. /BeginGradation where {pop BeginGradation} if
  523. xt yt radius cc1 mc1 yc1 kc1 cc2 mc2 yc2 kc2 oldrfp
  524. /EndGradation where {pop EndGradation} if
  525. } if
  526. } bdf
  527.  } if 
  528.  
  529.  /rfs4 where {
  530. pop
  531. /oldrfs /rfs4 load def 
  532. /rfs4 {
  533. /tint2 xdf 
  534. /tint1 xdf 
  535. /spotNum xdf 
  536. /radius xdf 
  537. /yt xdf 
  538. /xt xdf 
  539. save
  540. 20 dict dup begin
  541. /VGVersion 0 def
  542. /typeOfVign 3 def 
  543. /xDimension radius 2 mul def 
  544. /yDimension radius 2 mul def 
  545. /numOfColorPoints 2 def
  546. /verticalCoord [ yt yt ] def
  547. /horizontalCoord [ xt dup radius add ] def
  548. /colorArray [
  549. tint2 spots spotNum
  550. get aload pop pop pop 4{4 index mul 4 1 roll}repeat
  551. 5 -1 roll pop
  552. tint1 spots spotNum
  553. get aload pop pop pop 4{4 index mul 4 1 roll}repeat
  554. 5 -1 roll pop
  555. ] def
  556. /stepVectorFunction [0] def
  557. /smoothVG [0] def
  558. end
  559.  
  560. W
  561.  
  562. ScitexVignette 
  563.  
  564. exch 
  565.  
  566. restore
  567.  
  568. not {
  569. /BeginGradation where {pop BeginGradation} if
  570. xt yt radius spotNum tint1 tint2 oldrfs
  571. /EndGradation where {pop EndGradation} if
  572. } if
  573. } bdf
  574.  } if 
  575. xt not {yt restore} if
  576. /cvc [0 0 0 1] def 
  577. /vc{
  578.  AltsysDict /cvc 2 index put 
  579.  aload length 4 eq
  580.  {setcmykcolor}
  581.  {setspotcolor}
  582.  ifelse
  583. }bdf 
  584. /origmtx matrix currentmatrix def
  585. /ImMatrix matrix currentmatrix def